home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 8 / FM Towns Free Software Collection 8.iso / t_os / artemis / artsrc2 / gscreen.asm < prev    next >
Assembly Source File  |  1994-06-01  |  1KB  |  77 lines

  1. ;    私製ライブラリ・グラフィック篇
  2. ;    (c) MATSUUCHI Ryosuke in Dec,1992
  3. ;
  4. ;    gscreen.asm : 画面モードの設定
  5. ;
  6. ;    1992.12.28(Sun)
  7.  
  8.  
  9.         public    gscreen, _gscreen
  10.         extrn    _gwrtpage:near
  11.  
  12.         include    grplib.inc
  13.  
  14.  
  15.         assume    cs:cseg, ds:dseg
  16.  
  17.  
  18. dseg segment dword 'DATA'
  19. dseg ends
  20.  
  21.  
  22.  
  23. cseg segment dword 'CODE'
  24.  
  25. ;---------------------------------------------------------------
  26. ;    _gscreen : 画面モードの設定(現在の書き込みページ)
  27. ;        in  AL:画面モード
  28. ;
  29. ;    void    gscreen(int mode);
  30. ;---------------------------------------------------------------
  31.  
  32.  
  33.  
  34. gscreen        proc
  35.         mov    eax,[esp+4]
  36.         call    _gscreen
  37.         ret
  38. gscreen        endp
  39.  
  40.  
  41.  
  42. _gscreen    proc
  43.         push    eax
  44.         push    edx
  45.         mov    edx,[_wrtpage]
  46.         bt    edx,7
  47.         jc    #0
  48.             ;書き込みページが実画面の場合
  49.             mov    ah,01h
  50.             mov    byte ptr [_scrmod+edx*4],al
  51.             mov    byte ptr [_nowscrmod],al
  52.             xor    edx,edx
  53.             mov    dl,al
  54.             mov    al,byte ptr [_wrtpage]
  55.             call    _callEGB
  56.             ;★ BIOS 01H が書き込みページを変更するようなので、元にもどす
  57.             mov    eax,[_wrtpage]
  58.             call    _gwrtpage
  59.             jmp    #1
  60.         #0:
  61.             ;書き込みページが仮想画面の場合
  62.             and    edx,7fh
  63.             and    eax,0ffh
  64.             mov    [_vscrmod+edx*4],eax
  65.             mov    [_nowscrmod],eax
  66.         #1:
  67.         pop    edx
  68.         pop    eax
  69.         ret
  70. _gscreen    endp
  71.  
  72.  
  73.  
  74. cseg ends
  75.  
  76. end
  77.